#ifndef ZAD7LIBRARY_HPP
#define ZAD7LIBRARY_HPP

namespace amodlisz {

	double f(double t,double x);
 	double  exact(double t);

	class Function{
	public:
		virtual double* function(int n) = 0;
	};

	class ODE {
	public:
		double tini;                                          //initial time
		double ison;                                      // initial solution
		double tend;                                      //end time
		double (*sfn)(double t, double x);      // funkcja matematyczna
		ODE(double t0, double x0, double T, double(*f)(double,double));
	};

	class Euler: public Function, public ODE {
	public:
		Euler(double t0, double x0, double T, double(*fun)(double,double));
		double* function(int n);
	};

	class Eulerpc: public Function, public ODE {
	public:
		Eulerpc(double t0, double x0, double T, double(*fun)(double,double));
		double* function(int n);
	};

	class RK2: public Function, public ODE {
	public:
		RK2(double t0, double x0, double T, double(*fun)(double,double));
		double* function (int  n);
	};

}

#endif
